<?php
class User_model extends MY_Model {
    protected $_table = "tbl_user";
    
    public function __construct()
    {
        parent::__construct();
        $this->load->database();
    }
    
    public function login($username,$password)
    {
        $this->db->select('user_id,user_name,user_password');
        $this->db->from($this->_table);
        $this->db->where('user_name', $username);
        $this->db->where('user_password', md5($password));
        $query = $this->db->get();
        if($query->num_rows() == 1)
        {
            return $query->result();
        }
        else
        {
            return FALSE;
        }
        
    }
     
}